package entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TransId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TransId implements java.io.Serializable {

	// Fields

	private String numero;
	private String etat;
	private String porte;
	private String date;
	private String time;

	// Constructors

	/** default constructor */
	public TransId() {
	}

	/** full constructor */
	public TransId(String numero, String etat, String porte, String date,
			String time) {
		this.numero = numero;
		this.etat = etat;
		this.porte = porte;
		this.date = date;
		this.time = time;
	}

	// Property accessors

	@Column(name = "numero")
	public String getNumero() {
		return this.numero;
	}

	public void setNumero(String numero) {
		this.numero = numero;
	}

	@Column(name = "etat")
	public String getEtat() {
		return this.etat;
	}

	public void setEtat(String etat) {
		this.etat = etat;
	}

	@Column(name = "porte")
	public String getPorte() {
		return this.porte;
	}

	public void setPorte(String porte) {
		this.porte = porte;
	}

	@Column(name = "date")
	public String getDate() {
		return this.date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	@Column(name = "time")
	public String getTime() {
		return this.time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TransId))
			return false;
		TransId castOther = (TransId) other;

		return ((this.getNumero() == castOther.getNumero()) || (this
				.getNumero() != null && castOther.getNumero() != null && this
				.getNumero().equals(castOther.getNumero())))
				&& ((this.getEtat() == castOther.getEtat()) || (this.getEtat() != null
						&& castOther.getEtat() != null && this.getEtat()
						.equals(castOther.getEtat())))
				&& ((this.getPorte() == castOther.getPorte()) || (this
						.getPorte() != null && castOther.getPorte() != null && this
						.getPorte().equals(castOther.getPorte())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())))
				&& ((this.getTime() == castOther.getTime()) || (this.getTime() != null
						&& castOther.getTime() != null && this.getTime()
						.equals(castOther.getTime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getNumero() == null ? 0 : this.getNumero().hashCode());
		result = 37 * result
				+ (getEtat() == null ? 0 : this.getEtat().hashCode());
		result = 37 * result
				+ (getPorte() == null ? 0 : this.getPorte().hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		result = 37 * result
				+ (getTime() == null ? 0 : this.getTime().hashCode());
		return result;
	}

}